﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Drawing;
using System.Drawing.Drawing2D;

namespace TankWin.Classes
{
    class GUIHighScore:GUI
    {
        public override void Draw(System.Drawing.Graphics _G)
        {
            Bitmap _buffer = new Bitmap(300, 200);
            Graphics _gbuffer = Graphics.FromImage(_buffer);
            _gbuffer.Clear(frMain._Back_Color);

            Pen _pen = new Pen(Color.Silver);
            _gbuffer.DrawRectangle(_pen, new Rectangle(0, 0, 300, 200));

            Font _font = new Font("Times New Roman", 20, FontStyle.Bold);
            _gbuffer.DrawString("SCORE",_font,Brushes.Silver,new PointF(150-20*"SCORE".Length/2,30));

            Font _font1=new Font("Times New Roman",36,FontStyle.Underline);
            string _hs=""+frMain._highScore;
            _gbuffer.DrawString(_hs,_font1,Brushes.Red,new PointF(150-20*_hs.Length,100));
            _G.DrawImageUnscaled(_buffer,170,220);

        }
       public override void InputKey(Keys _key)
        {
            switch (_key)
            {
                case Keys.Escape:
                    if (GUIMainMenu._enter_player.IsLoadCompleted && GUIPlay._hasSound)
                        GUIMainMenu._enter_player.Play();
                    frMain._statusGUI = EStatusGUI.MainMenuGUI;
                    break;
                case Keys.Enter:
                    goto case Keys.Escape;
            }
        }

    }
}
